#pragma once
//#include "BasicRect.h"
//#include "Line.h"
class Str;

class Point2D
{
private:
    double x,y;
public:
    Point2D();
    Point2D(double x,double y);
    ~Point2D();
    Point2D& set(double x,double y);
    double getX();
    double getY();
    Point2D& setX(double x);
    Point2D& setX(Point2D &pt);
    Point2D& setY(double y);
    Point2D& setY(Point2D &pt);
    double distance(Point2D &pt);
	double directionR(Point2D &pt);
	double directionD(Point2D &pt);
    Point2D& copy(Point2D &pt);
    Point2D& add(Point2D &pt);
    Point2D& sub(Point2D &pt);
    bool isEq(Point2D &pt);
    bool isNeq(Point2D &pt);
    Point2D& operator+=(Point2D &pt);
    Point2D& operator-=(Point2D &pt);
    Point2D& operator=(Point2D &pt);
	bool operator==(Point2D &pt);
	bool operator!=(Point2D &pt);
    
    Str& toString(Str &t);
    
    //bool isWithin(BasicRect &rect);
    
    //With other shapes (pt is the closest Point2D)
    //Point2D& closestPoint2D(Line line, Point2D &pt);
    //Point2D& closestPoint2D(Triangle triangle, Point2D &pt);
    //Point2D& closestPoint2D(BasicRect &rect, Point2D &to);
    
    void draw(double depth);
    void draw_color(double depth, int hexColor);
    void draw_size(double depth, double radius);
    void draw_sizeColor(double depth, double radius, int hexColor);
};